import React, { useEffect } from "react"
import { useNavigate } from "react-router-dom"

const Index = () => {
  // 此处需要判断登录权限如果没用登录权限需要跳转Login
  const isAuth = true;
  const navigate = useNavigate()
  useEffect(() => {
    navigate(isAuth ? '/root/home' : '/login')
  }, [isAuth, navigate])
  return (
    <div>Index</div>
  )
}

export default Index